qui(
    function (require, exports, module) {
        Zhibo.Dao = $.extend({}, EpgWeb.Dao, {
            cfgName: {
                getSourceIp: "getSourceIp",
                LogType: "vod_log"
            },
            getList: function (data, callback) {
                var options = {
                    type: "get",
                    url: Zhibo.urlConfig.channelUrl,
                    dataType: "json",
                    data: data,
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options);
            },
            getIpList: function (data, callback) {
                var options = {
                    type: "get",
                    url: Zhibo.urlConfig.machinemodifyUrl,
                    dataType: "json",
                    data: data,
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options);
            },
            modifyChannel: function (data, callback) {
                var options = {
                    type: "post",
                    url: Zhibo.urlConfig.modifyUrl,
                    dataType: "json",
                    data: data,
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options);
            },
            addChannel: function (data, callback) {
                var options = {
                    type: "post",
                    url: Zhibo.urlConfig.channelUrl,
                    dataType: "json",
                    data: data,
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options);
            },
            IpModify: function (data, callback) {
                var options = {
                    type: "post",
                    url: Zhibo.urlConfig.machinemodifyUrl,
                    dataType: "json",
                    data: data,
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options);
            },
            dotLoad: function (data, callback) {
                var url = Zhibo.urlConfig.dotLoadUrl.replace("@ipServer", $("#ip").val());
                var options = {
                    type: "get",
                    url: url,
                    dataType: "json",
                    data: data,
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options);
            },
            version: function (data, callback) {
                var url = Zhibo.urlConfig.versionUrl.replace("@ipServer", $("#ip").val());
                var options = {
                    type: "get",
                    url: url,
                    dataType: "text",
                    data: data,
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options);
            },
            channelInfo: function (data, callback) {
                var url = Zhibo.urlConfig.channelInfoUrl.replace("@ipServer", $("#ip").val());
                var options = {
                    type: "get",
                    url: url,
                    dataType: "json",
                    data: data,
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options);
            },
            submitLogEntity: function (data, callback) {
                var url = Zhibo.urlConfig.submitLogUrl;
                var options = {
                    type: "post",
                    url: url,
                    dataType: "json",
                    data: {data: JSON.stringify(data)},
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options, "/vod/saveLog");
            },
            logType: function () {
                return this.getDataByName(this.cfgName.LogType);
            },
            getSourceIp: function () {
                return this.getDataByName(this.cfgName.getSourceIp);
            },
            // 开始 收录任务相关
            delRecord:function(data, callback){
                var options = {
                    type: "post",
                    url: Zhibo.urlConfig.recordDelUrl,
                    dataType: "json",
                    data: data,
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options,"/vod/vodRecord/del");
            },
            addRecord:function(data, callback){
                var options = {
                    type: "post",
                    url: Zhibo.urlConfig.recordAddUrl,
                    dataType: "json",
                    data: data,
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options,"/vod/vodRecord/add");
            },
            editRecord:function(data, callback){
                var options = {
                    type: "post",
                    url: Zhibo.urlConfig.recordEditUrl,
                    dataType: "json",
                    data: data,
                    success: function (data) {
                        callback.call(this, data);
                    },
                    error: function (data) {
                        callback.call(this, data);
                    }
                }
                Ancestor.Dao.ajax(options,"/vod/vodRecord/edit");
            }
            // 结束 收录任务相关
        })
    }
);